package com.loser.search.handler;

import com.loser.search.entity.OptLog;
import com.loser.search.service.DocumentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Slf4j
@Component
public class DocumentHandler {

    @Autowired
    private DocumentService documentService;

    public Boolean save(OptLog log) {
        return documentService.save(log);
    }

    public List<OptLog> listByUserId(Long userId) {
        log.info("listByUserId {}", userId);
        return documentService.listByUserId(userId);
    }
}
